﻿#ifndef HALCONLINEFINDWIDGET_H
#define HALCONLINEFINDWIDGET_H

#include <QWidget>
#include <QSpinbox>
#include <QDoubleSpinbox>
#include <QLineEdit>
#include <QPushButton>
#include <QTabWidget>
#include <QCheckBox>
#include "WidgetRoiDraw.h"
#include "QtHalcon.h"

class HalconLineFindWidget : public QWidget
{
    Q_OBJECT
public:
    explicit HalconLineFindWidget(QWidget *parent = nullptr);
    void setImage(const QImage& img);
    LineFindParam getParam();
    void setParam(const LineFindParam& par);
signals:

private:
    void setupUI();
    void initUI();
    void initConnection();
    void updateLineFindPar();

private:
    //LineFind
    WidgetRoiDraw* wgtRoiLineFind;
    QSpinBox* spboxPointNum;
    QSpinBox* spboxPointFindWidth;
    QComboBox* cbboxLinePolarity;
    QComboBox* cbboxLineSelect;
    QDoubleSpinBox* dspboxMinScore;
    QDoubleSpinBox* dspboxMeasureThr;
    QDoubleSpinBox* dspboxMeasureSigma;
    QPushButton* pbtnLineFind;
    //var
    QImage mImg;
    LineFindParam mParam;

};

#endif // HALCONLINEFINDWIDGET_H
